<?php

/**
 * This is the model metadata class for table "goods_information".
 */
class GoodsInformationMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'goods_information';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('uid, type, recommend', 'numerical', 'integerOnly'=>true),
			array('name', 'length', 'max'=>30),
			array('content, time', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, uid, name, type, content, time, recommend', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => '商品资讯id',
			'uid' => '评论人id',
			'name' => '评论人名称',
			'type' => '商品类型',
			'content' => '评论内容',
			'time' => '发表评论时间',
			'recommend' => '推荐',
		);
	}
}